package week6.shi;

/**
 * Created by mc on 2017/4/2.
 */
import static java.lang.System.out;

public class txt2 {
    public static void main(String[] args) {
        boolean[] flags = {true, false};
        int totalStep = 10;
        int a = 0;
        int b = 0;
        out.println("0");
        while(a < totalStep && b < totalStep) {
            a++;
            out.println(a);
            boolean isHareSleep = flags[((int) (Math.random() * 10)) % 2];
            if(isHareSleep) {
                out.println(" ");
            } else {
                b += 2;
                out.println( b);
            }
        }
    }
}